
package com.eyedog.video.entity;

import android.os.Parcel;
import android.os.Parcelable;

import com.eyedog.video.db2.entities.BaseEntity;

import java.util.List;

public class SplashEntity extends BaseEntity implements Parcelable {

    public long duration;// 单位：ms

    public List<ADVEntity> advEntities;

    public SplashEntity() {
    }

    public SplashEntity(long duration, List<ADVEntity> advEntities) {
        this.duration = duration;
        this.advEntities = advEntities;
    }

    protected SplashEntity(Parcel in) {
        duration = in.readLong();
        advEntities = in.createTypedArrayList(ADVEntity.CREATOR);
    }

    public static final Creator<SplashEntity> CREATOR = new Creator<SplashEntity>() {
        @Override
        public SplashEntity createFromParcel(Parcel in) {
            return new SplashEntity(in);
        }

        @Override
        public SplashEntity[] newArray(int size) {
            return new SplashEntity[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeLong(duration);
        parcel.writeTypedList(advEntities);
    }
}
